package com.binc.testspring.common.lamada;

import com.binc.testspring.common.lamada.pojo.Color;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class Reduce_test {

    public static void main(String[] args) {
        List<Color> list = new ArrayList<>();
        list.add(new Color(5, "DogA5"));
        list.add(new Color(5, "DogA5_2"));
        list.add(new Color(4, "DogA4"));
        list.add(new Color(6, "DogA6"));
        List<Color> collect = list.stream().distinct().collect(Collectors.toList());
        System.out.println(collect);
        // list.stream().reduce()

    }

    }
